#
# @lc app=leetcode.cn id=392 lang=python
#
# [392] 判断子序列
#

# @lc code=start
class Solution(object):
    def isSubsequence(self, s, t):
        """
        :type s: str
        :type t: str
        :rtype: bool
        """
        dp = [False] * (len(s))
        index = 0
        for i in range(len(s)):
            for j in range(index, len(t)):
                if s[i] == t[j]:
                    dp[i] = True
                    index = j+1
                    break
            if dp[i] is False:
                return False
        return True
        
# @lc code=end

